package com.dindang.maintenance.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.dindang.maintenance.mvp.contract.CompleteContract;
import com.dindang.maintenance.mvp.model.CompleteModel;


@Module
public class CompleteModule {
    private CompleteContract.View view;

    /**
     * 构建CompleteModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public CompleteModule(CompleteContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    CompleteContract.View provideCompleteView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    CompleteContract.Model provideCompleteModel(CompleteModel model) {
        return model;
    }
}